package szf.im.server.util;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author shizhanfu
 * zk配置
 */
@Component
public class ZkCfg {
    @Value("${zk.host}")
    private String host;
    @Value("${zk.port}")
    private int port;

    /**
     * 获取连接字符串
     * @return
     */
    public String getConn() {
        return getHost() + ":" + getPort();
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }
}
